from django.urls import path, re_path
from . import views
from rest_framework.routers import DefaultRouter

router = DefaultRouter()
# router.register('alter', views.UserView, basename='create_user')

urlpatterns = [
    path('create/', views.CreateUserView.as_view(), name='create_name'),
    re_path(r'alter/(?P<pk>\d+)/$', views.UserView.as_view(), name='user_alter'),
    path('list/', views.UserListView.as_view({'get': 'list'}), name='user_list'),
    path('test/', views.UserStatisticsView.as_view(), name='user_test')
]

urlpatterns.extend(router.urls)
